package com.polaris.live.ui.live.bean

import com.polaris.live.im.sfs.bean.live.ext.UserBasicVo
import com.polaris.live.resp.back_resp.DisplayUserBean

/**
 * LiveSpectatorBean
 *
 * @author Created by lucas on 2023/11/10 10:46
 * @since 1.0.0
 */
data class LiveSpectatorBean(
    /**
     * 主播id
     */
    override val anchorId: Long,
    /**
     * 主播封面
     */
    override val coverUrl: String?,
    /**
     * 主播流id
     */
    val streamId: String?,
    /**
     * 主播用户数据
     */
    val userBasic: UserBasicVo?,
    /**
     * 是否是游戏打开
     */
    val isGame: Boolean = false,
) : DragBean()

internal fun DisplayUserBean.toLiveSpectatorBean(): LiveSpectatorBean {
    return LiveSpectatorBean(
        base.userId,
        cover,
        playStreamId,
        base,
        false,
    )
}